<template>
  <view class="personal">
    <view class="header">
      <image src="/static/user-avatar.svg" class="avatar"/>
      <text class="username">{{ username }}</text>
    </view>
    <view class="content">
      <view class="card" @click="navigateTo('edit-profile')">
        <image src="/static/edit-profile-icon.svg" class="icon"/>
        <text>编辑个人信息</text>
      </view>
      <view class="card" @click="navigateTo('membership')">
        <image src="/static/membership-icon.svg" class="icon"/>
        <text>会员卡信息</text>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  data() {
    return {
      username: 'Jane Doe'
    };
  },
  methods: {
    navigateTo(page) {
      uni.navigateTo({
        url: `/${page}`
      });
    }
  }
};
</script>

<style scoped>
.personal {
  background-color: #fce4ec;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

.header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 20px;
}

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  margin-bottom: 10px;
}

.username {
  font-size: 20px;
  color: #ffffff;
}

.content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.card {
  width: 80%;
  margin: 10px;
  padding: 20px;
  background-color: #ffccbc;
  border-radius: 20px;
  display: flex;
  align-items: center;
}

.icon {
  width: 30px;
  height: 30px;
  margin-right: 10px;
}
</style>